import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';

@Component({
  selector: 'app-list',
  templateUrl: './list.component.html',
  styleUrls: ['./list.component.scss'],
})
export class ListComponent implements OnInit {
  userList: any[] = [];

  constructor(
    private http: HttpClient,
  ) {
  }

  ngOnInit(): void {
    this.http.get<any[]>(`/api/user/list`).subscribe(r => {
      this.userList = r;
    });
  }
}
